<%
	import com.gmongo.GMongo
	import com.db.Config;
	def mongo = new GMongo(Config.dbip,Config.dbport)
	def db = mongo.getDB(Config.dbname)
	def sendto=request.getParameter('sendto')
	if(sendto==null||sendto.length()==0){
		db.(Config.NEED_SEND_EMAIL_MESSAGE).remove(key:request.getParameter('key'))
		println "del: key"
	}else{
		if(sendto=='all'){
			db.(Config.NEED_SEND_EMAIL_MESSAGE).remove([:])
			println 'del:all'
		}else{
			println 'del:'
			(db.(Config.NEED_SEND_EMAIL_MESSAGE).find(sendto:sendto)).each{ println it }
			db.(Config.NEED_SEND_EMAIL_MESSAGE).remove(sendto:sendto)
		}
	}
%>
 